package com.takeshi.landlords.resp;

/**
 * Command
 *
 * @author Nanase Takeshi
 * @date 2022/2/16 16:40
 */
public enum Command {

    /**
     * 返回基础欢迎信息/查看最新的可用房间列表/查看示例和房间成员
     */
    REFRESH("f", "refresh", 1),
    /**
     * 查看前几个人出的牌
     */
    VIEW("v", "view", 1),
    /**
     * 退出房间/返回上一级
     */
    EXIT("e", "exit room or back to previous", 1),
    /**
     * 开始游戏
     */
    START_GAME("s", "start game", 2),
    /**
     * 不出牌
     */
    PASS("p", "pass", 2),
    /**
     * 设置密码（四位数）
     */
    SET_PWD("set pwd ", "set pwd xxxx", 2),
    /**
     * 关闭密码
     */
    CLOSE_OFF("close pwd", "close pwd", 2);

    /**
     * 命令
     */
    private final String command;
    /**
     * 描述
     */
    private final String describe;
    /**
     * 1:全局指令，2：房间指令
     */
    private final int type;

    Command(String command, String describe, int type) {
        this.command = command;
        this.describe = describe;
        this.type = type;
    }

    public String getCommand() {
        return command;
    }

    public String getDescribe() {
        return describe;
    }

    public int getType() {
        return type;
    }
}
